<?php


class LinkTable extends Doctrine_Table
{
    
    public static function getInstance()
    {
        return Doctrine_Core::getTable('Link');
    }

	public function getLinkBySpecial($special,$max)
    {
		$q = Doctrine_Query::create()
			->from('Link l')
			->where('l.special_id ='.$special)
			->orderBy('id desc')
			->limit($max);
		return $q->execute();
    }
}